package kr.go.nih.biomedi.snptorrent.dao;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import kr.go.nih.biomedi.snptorrent.manager.SqlMapClientManager;

import com.ibatis.sqlmap.client.SqlMapClient;

public class CytobandDao {
	private static SqlMapClient sqlMap = SqlMapClientManager.getSqlMapClient();
	
	public List getCytoBandChromsomeRange(String chrom, int chromStart, int chromEnd) throws SQLException {
		HashMap param = new HashMap();
		param.put("chrom", chrom);
		param.put("chromStart", chromStart);
		param.put("chromEnd", chromEnd);
		
		return sqlMap.queryForList("getCytoBandChromsomeRange", param);
	}
	
	public List getCytoBandChromosomeName(String chrom) throws SQLException {
		return sqlMap.queryForList("getCytoBandChromosomeName", chrom);
	}
	
	public int getCoutCytoBandChromosomeName(String chrom) throws SQLException {
		return (Integer) sqlMap.queryForObject("getCountBandChromosomeName", chrom);
	}
}
